package org.example.ch2;

import io.reactivex.rxjava3.core.Observable;

import java.util.concurrent.Callable;

public class Main7 {
    public static void main(String[] args) {

//        Observable.fromCallable(new Callable<String>() {
//            @Override
//            public String call() throws Exception {
//                return "hello lagou";
//            }
//        }).subscribe(System.out::println);

        Observable.fromCallable(() -> "hello lagou")
                .subscribe(System.out::println);

    }
}
